(function() {
    var b = mobiscroll,
        a = b.$;
    b.themes.frame.jqm = {
        jqmBody: 'a',
        jqmBorder: 'a',
        jqmLine: 'b',
        jqmSet: 'b',
        jqmCancel: 'c',
        dateDisplay: 'Mddyy',
        disabledClass: 'ui-disabled',
        activeClass: 'ui-btn-active',
        activeTabInnerClass: 'ui-btn-active',
        btnCalPrevClass: '',
        btnCalNextClass: '',
        selectedLineBorder: 1,
        checkIcon: 'none ui-btn-icon-left ui-icon-check',
        onThemeLoad: function(d) {
            var a = d.settings,
                b = a.jqmBody || 'c',
                c = a.jqmEventBubble || 'a';
            a.dayClass = 'ui-body-a ui-body-' + b;
            a.innerDayClass = 'ui-state-default ui-btn ui-btn-up-' + b;
            a.calendarClass = 'ui-body-a ui-body-' + b;
            a.weekNrClass = 'ui-body-a ui-body-' + b;
            a.eventBubbleClass = 'ui-body-' + c;
        },
        onInit: function() {
            a(this).closest('.ui-field-contain').trigger('create');
        },
        onEventBubbleShow: function(b) {
            a('.mbsc-cal-event-list', b.eventList).attr('data-role', 'listview');
            a(b.eventList).page().trigger('create');
        },
        onMarkupInserted: function(d, e) {
            var c = e.settings,
                b = a(d.target);
            a('.mbsc-np-btn, .mbsc-cal-sc-m-cell .mbsc-cal-sc-cell-i', b).addClass('ui-btn');
            a('.mbsc-fr-btn-cont .mbsc-fr-btn, .mbsc-range-btn', b).addClass('ui-btn ui-mini ui-corner-all');
            a('.mbsc-cal-prev .mbsc-cal-btn-txt', b).addClass('ui-btn ui-icon-arrow-l ui-btn-icon-notext ui-shadow ui-corner-all');
            a('.mbsc-cal-next .mbsc-cal-btn-txt', b).addClass('ui-btn ui-icon-arrow-r ui-btn-icon-notext ui-shadow ui-corner-all');
            a('.mbsc-fr-popup', b).removeClass('dwbg').addClass('ui-selectmenu ui-overlay-shadow ui-corner-all ui-body-' + c.jqmBorder);
            a('.mbsc-fr-btn-s .mbsc-fr-btn', b).addClass('ui-btn-' + c.jqmSet);
            a('.mbsc-fr-hdr', b).addClass('ui-header ui-bar-inherit');
            a('.mbsc-fr-w', b).addClass('ui-corner-all ui-body-' + c.jqmBody);
            a('.mbsc-sc-btn', b).addClass('ui-btn ui-mini ui-corner-all ui-btn-icon-top');
            a('.mbsc-sc-btn-plus', b).addClass('ui-icon-carat-d');
            a('.mbsc-sc-btn-minus', b).addClass('ui-icon-carat-u');
            a('.mbsc-sc-whl-l', b).addClass('ui-body-' + c.jqmLine);
            a('.mbsc-cal-tabs', b).attr('data-role', 'navbar');
            a('.mbsc-cal-prev .mbsc-cal-btn-txt', b).attr('data-role', 'button').attr('data-icon', 'arrow-l').attr('data-iconpos', 'notext');
            a('.mbsc-cal-next .mbsc-cal-btn-txt', b).attr('data-role', 'button').attr('data-icon', 'arrow-r').attr('data-iconpos', 'notext');
            a('.mbsc-cal-events', b).attr('data-role', 'page');
            a('.mbsc-range-btn', b).attr('data-role', 'button').attr('data-mini', 'true');
            a('.mbsc-np-btn', b).attr('data-role', 'button').attr('data-corners', 'false');
            b.trigger('create');
        }
    };
}());